<template>
  <div class="eminent">
    <div class="eminent-info">
      <div class="eminent-info-img"><img :src="elite.img_url" :mode="'widthFix'"></div>
      <div class="eminent-name">{{elite.name}}</div>
      <div class="eminent-company">{{elite.own_company}}</div>
    </div>
    <div class="eminent-intro">
      <div class="eminent-intro-title">人物介绍</div>
      <wxParse :content="elite.info"/>
    </div>
  </div>
</template>

<script>
import wxParse from 'mpvue-wxparse'
export default {
  data(){
    return{
      elite:{},
      id:""
    }
  },
  onLoad(options){
    this.id = options.id;
    this.reqChamberCommerceEliteList();
  },
  //下拉刷新
  onPullDownRefresh () {
    this.reqChamberCommerceEliteList();
  },
  components:{
    wxParse,
  },
  methods:{
    // 获取首页杰出人物列表
    async reqChamberCommerceEliteList(){
      let params = {
        id:this.id
      };
      let res = await this.$api.getChamberCommerceEliteList(params);
      wx.stopPullDownRefresh()
      if(res.data.level == "success"){
        let data = res.data.data;
        this.elite = data[0];
      }else{
        wx.showToast({
          title: '获取失败',
          icon: 'none',
          duration: 1000
        })
      }
    },
  }
}
</script>

<style lang="scss" scoped>
 .eminent{
   .eminent-info{
     .eminent-info-img{
       width: 100%;
       img{
         width: 100%;
       }
     }
     .eminent-name,
     .eminent-company{
       height: 60rpx;
       line-height: 60rpx;
       font-size: 32rpx;
       margin-left: 20rpx;
     }
   }
   .eminent-intro{
     padding: 0 20rpx;
     .eminent-intro-title{
       height: 80rpx;
       line-height: 80rpx;
       font-size: 36rpx;
       font-weight: bolder;
     }
     .eminent-intro-content{
       color: #333333;
       font-size: 28rpx;
       line-height: 30rpx;
     }
   }
 }
</style>